<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Quikin</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css" />
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script>
<script>
	// Require the Dialog class
	require(["dijit/registry", "dojo/ready", "dijit/Dialog","dijit/form/Button","dijit/form/TextBox","dijit/form/ValidationTextBox", "dojox/validate/web",
	         "dojo/parser","dojox/validate/us","dijit/form/Form"], function(registry, ready){
		ready(function() {
			registry.byId("loginDialog").show();
		});
		
	});
</script>
</head>
<body class="claro">
<div class="dijitHidden">
<div data-dojo-type="dijit.Dialog" style="width:400px;" data-dojo-props="title:'系統登入'" id="loginDialog">
<form data-dojo-type="dijit.form.Form"  method="post" action="${pageContext.servletContext.contextPath}/html/login">
	<script type="dojo/method" data-dojo-event="onSubmit">
			if(this.validate()){
				return true;
			}else{
				return false;
			}
		</script>
	<strong><label for="email" style="display:inline-block;width:100px;">Email:</label></strong>
	<input type="text" data-dojo-type="dijit.form.ValidationTextBox" data-dojo-props="validator:dojox.validate.isEmailAddress,
        invalidMessage:'This is not a valid email!', required:true" id="email" name="email" />
	<br />
	<strong><label for="pass" style="display:inline-block;width:100px;">Password:</label></strong>
	<input type="password" data-dojo-type="dijit.form.ValidationTextBox" data-dojo-props="trim:true, required:true" id="pass" name="pass" />
	<br />
	<button data-dojo-type="dijit.form.Button" type="submit" style="text-align: center;">Submit</button>

</form>
</div>
</div>
</body>
</html>